package com.ricchieri.dao;

import java.util.List;

import org.hibernate.Criteria;

import com.ricchieri.dao.interf.IDetailTripDao;
import com.ricchieri.filter.BasicFilter;
import com.ricchieri.model.DetailTrip;

public class DetailTripDao extends GenericDao implements IDetailTripDao {
	private static final long serialVersionUID = -2622440495252941914L;

	@Override
	@SuppressWarnings("unchecked")
	public List<DetailTrip> getAllDetailTrip(BasicFilter filter) {
		Criteria criteria = criteriaAllDetailTrip(filter);
		
		return criteria.list();
	}
	
	private Criteria criteriaAllDetailTrip(BasicFilter filter) {
		return super.criteriaAllBasic(filter, DetailTrip.class);
	}	
	
	@Override
	protected String getTableName() {
		return "detailTrip";
	}
}
